;;; +neotree.el --- Initialization and mode setting.

;;; Homepage:
;; https://github.com/jaypei/emacs-neotree

;;; Commentary:
;; Directory tree displays.

;;; Code:

(use-package neotree
  :ensure
  :bind
  ("M-f" . neotree-toggle)
  (:map neotree-mode-map
	("s" . (lambda ()
		 (interactive)
		 (setq neo-click-changes-root t)
 		 (neotree-change-root)
		 (setq neo-click-changes-root nil)))
	("<mouse-4>" . neotree-previous-line)
	("h" . neotree-hidden-file-toggle)
	("p" . neotree-projectile-action)
	("<mouse-5>" . neotree-next-line)
	("<up>" . neotree-previous-line)
	(".." . neotree-select-up-node)
	("<down>" . neotree-next-line)
	("t" . neotree-create-node)
	("R" . neotree-delete-node)
	("m" . neotree-rename-node)
	("c" . neotree-copy-node)
	("M-n" . neotree-toggle)
	("u" . neotree-refresh))
  :init
  (setq neo-hidden-regexp-list '("^\\." "^\\.?#.+")
	neo-mode-line-custom-format '(" NeoTree")
	neo-confirm-create-directory 'off-p
	neo-confirm-change-root 'off-p
	neo-confirm-create-file 'off-p
	neo-vc-integration '(face)
	neo-mode-line-type 'custom
	neo-window-fixed-size nil
	neo-show-updir-line nil
	neo-window-width 22
	neo-autorefresh t
	neo-hide-cursor t
	neo-theme 'icons)
  :config
  (set-face-attribute 'neo-root-dir-face nil :weight 'normal :foreground (face-attribute 'default :foreground)))

(provide '+neotree)

;;; +neotree.el ends here
